
#ifndef _SLOT_H_
#define _SLOT_H_
#include "connector.h"
#include "character_module.h"
#include "icc.h"

typedef struct 
{
	icc_t *icc;
	character_module_t *module;
	connector_t *connector;
	uint8_t number;
}slot_t;


uint32_t Slot_CheckCard(uint8_t number);
uint32_t Slot_CheckCardPresent(slot_t *currentSlot);
uint32_t Slot_Connect(slot_t *currentSlot);
void Slot_Init(void);
uint32_t Slot_PowerOff(slot_t *currentSlot);
uint32_t Slot_ExchangAPDU(slot_t *slot, uint8_t c_apdu[], uint32_t c_apdu_len, uint8_t r_apdu[], uint32_t *r_apdu_len);
uint32_t Slot_PowerOn(slot_t *slot, uint8_t atr[], uint8_t *atr_len);
uint32_t Slot_ColdReset(slot_t *currentSlot, uint8_t voltage);
void Slot_WarmReset(slot_t *currentSlot);

void Slot_SetBWT(slot_t *slot, uint32_t bwt);
void Slot_SetWaitTime(slot_t *slot, uint32_t bwt, uint32_t cwt);

#endif

